<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>无标题文档</title>
	<link href="/res/css/style.css" rel="stylesheet" type="text/css" />
	<link href="/res/js/lib/layer/skin/layer.css" rel="stylesheet" type="text/css" />
	<link href="/res/js/lib/layer/skin/layer.ext.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/res/js/jquery.js"></script>
	<script type="text/javascript" src="/res/js/lib/json2.js"></script>	
	<script type="text/javascript" src="/res/js/lib/layer/layer.js"></script>
	<script type="text/javascript" src="/res/js/common/msgTools.js"></script>
	<script language="javascript" type="text/javascript" src="/res/js/lib/datePicker/WdatePicker.js"></script>		
 	<script type="text/javascript" src="/res/js/pages/system/adminList.js"></script>
</head>
<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">权限管理</a></li>
    <li><a href="#">后台用户</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    <div class="tools" style="margin:3px 0px;padding:6px 0px;">  
    	<ul class="toolbar" style="margin-left:20px;">
	        <li id="btnAdd"><span><img src="/res/images/t01.png" /></span>添加</li>
	        <li id="btnDisable"><span><img src="/res/images/t03.png" /></span>禁用</li>
	        <li id="btnEnable"><span><img src="/res/images/t04.png" /></span>启用</li>	        
        </ul>    
    </div> 

    <form id="listForm" action="/system/admin/list" method="post"> 
    <table class="tablelist">
    	<thead>
	    	<tr>
	        <th class="chk"><input id="chkAll" type="checkbox" value="" /></th>
	        <th>编号</th>
			<th>管理员</th>
			<th>是否启用</th>
			<th>最后登录ip </th>
			<th>最后登录时间</th>
			<th>创建时间</th>
			<th>角色</th>
			<th>操作</th>
	        </tr>
        </thead>
        <tbody>        
	        <c:forEach items="${list}" var="row" varStatus="status">
		        <tr>
		        <td align="center"><input id="chk_${row.id}" type="checkbox" value="${row.id}" /></td>
		        <td>${status.index+1}</td>
		        <td>${row.login_name}</td>
		        <td>${row.is_enable==1?"是":"否"}</td>
		        <td>${row.login_ip}</td>
		        <td><fmt:formatDate value="${row.login_time}" pattern="yyyy-MM-dd HH:mm"/> </td>
		        <td><fmt:formatDate value="${row.create_time}" pattern="yyyy-MM-dd HH:mm"/> </td>
		        <td><a href="javascript:setRoles('${row.id}')" class="tablelink">角色</a></td>
		        <td>
					<a href="javascript:edit('${row.id}')" class="tablelink">修改</a>   
					<a href="javascript:resetPsw('${row.id}')" class="tablelink">重置密码</a>
		            <a href="javascript:deleteRole('${row.id}')" class="tablelink">删除</a>    
				</td>
		        </tr> 
	        </c:forEach>
         </tbody>
    </table>   
    </form>
      
    <tags:pager pagerRange="10" pageSize="${pager.pageSize}" totalPage="${pager.pageCount}" curIndex="${pager.pageIndex}" rowCount="${pager.rowCount}" formId="queryForm"></tags:pager> 
 
    
    </div>
    
    <script type="text/javascript">
	   $('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>

</html>
